package first.chapter2.eventdemo;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @Description: 类作用描述
 * @Author: ChenZhiXiang
 * @CreateDate: 2019/5/8 0008 17:51
 * @Version: 1.0
 */
@Component
public class DemoListener implements ApplicationListener<DemoEvent> {

    @Override
    public void onApplicationEvent(DemoEvent demoEvent) {

        System.out.println("监听到事件---"+demoEvent.getMsg());
    }
}
